package com.realife.eson.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.ToString;

@Getter
@AllArgsConstructor
@ToString
public enum ResponseEnum {

    SUCCESS(200, "成功"),
    ERROR(2000, "业务出现一点问题,见详情如下:"),
    EXCEPTION_EXC(18001, "server inner exception"),
    THROWABLE_ERR(18000, "server inner throwable"),


    PARAMETERS_MISSING(1001, "参数缺失"),

    //
    NOT_LEGAL_CHAR(18100, "包含非法字符"),
    ADD_ACCOUNT_ERR(18200, "新增账户失败"),

    //-1xx 服务器错误
    BAD_SQL_GRAMMAR_ERROR(101, "sql语法错误"),
    SERVLET_ERROR(102, "servlet请求异常"), //-2xx 参数校验
    UPLOAD_ERROR(103, "文件上传错误"),
    EXPORT_DATA_ERROR(104, "数据导出失败"),

    //meta sys label
    ADD_METASYS_LABEL_ERR(18300, "metaSys标签添加失败"),
    LABEL_DUPLICATION_ERR(18301, "标签位点,靶点已存在,既标签重复"),
    ADD_LABEL_ERR(18302, "新增标签失败"),
    META_SYSTEM_EXIST(18303, "子系统已存在"),
    META_SYSTEM_USER_NULL(18304, "子系统还没有用户"),
    REMOVE_DATA_OK(18305, "数据移除成功"),
    META_SYSTEM_NOT_EXIST(18306, "子系统不存在"),
    META_SYSTEM_CODE_NOT_NULL(18307, "子系统编码必填"),
    META_SYSTEM_CODE_NOT_M1(18308, "未选择子系统,无法执行操作"),
    SYSTEM_CODE_EXIST(18309, "系统编号已存在"),
    SYSTEM_NAME_EXIST(18309, "系统名称已存在"),

    APP_TYPE_PARAM_PROPERTIES_KEY_DUPLICATED(19001, "应用类型拓展字段属性key重复"),
    APP_TYPE_PARAM_EXIST_NULL(19002, "应用类型拓展字段存在空值"),
    APP_TYPE_DATA_NOT_EXIST(19003, "应用类型数据不存在"),
    APP_TYPE_IS_NULL(19004, "暂无应用类型数据"),
    APP_NOT_EXIST(19010, "应用数据不存在"),
    APP_EXTENSION_PARAM_PROPERTIES_KEY_DUPLICATED(19021, "应用拓展字段属性key重复"),
    APP_EXTENSION_PARAM_EXIST_NULL(19022, "应用拓展字段存在空值"),


    //application
    PARAM_MAP_NOT_NULL(19100, "分页map参数集合必填"),
    PARAM_NOT_NULL(19101, "参数为空"),
    DATA_DUPLICATED(19102, "数据重复"),


    //
    PARAM_ILLEGAL(18400, "出现非法参数(null or empty)"),
    TARGET_RESULT_NOT_MATCH(18401, "目标数量与结果数量不匹配"),
    RESULT_NOT_NULL(18402, "结果不能为空"),
    STATUS_NOT_MATCH(18403, "状态码不匹配"),
    RESULT_NOT_MATCH(18404, "状态码不匹配"),

    //TOKEN相关
    TOKEN_PARSE_ERROR(19201, "TOKEN解析错误"),

    //调用第三方接口异常
    TRANSFER_UPMS_ERROR(19301, "调用upms接口异常"),


    //对接argo
    REDIRECT_ERROR(19401, "重定向失败"),
    CREATE_ERROR(19402, "创建异常"),
    ARGO_TOKEN_MISSING(19403, "缺失argotoken"),


    //IO
    STREAM_To_BYTE_ARRAY_ERROR(19500, "streamToByteArray exception"),

    ;


    //响应状态码
    private Integer statusCode;
    //响应信息
    private String message;
}
